﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<%@ Import Namespace="Chowpoo.Util" %>
<%@ Import Namespace="CourseSystem.Common.Helpers" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    考试管理
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <% Html.RenderPartial("AdminTopUc", "考试管理"); %>
    <table width="100%" border="0" cellpadding="0" cellspacing="1" class="table03">
        <% using (Ajax.BeginForm("ExaminationListUc", new AjaxOptions { HttpMethod = "Get", UpdateTargetId = "listDiv", }))
           {%>
        <tr class="box06">
            <td width="5%" height="27" align="center">
                <div align="right">
                    院校 :
                </div>
            </td>
            <td width="13%" align="center" class="bg3">
                <div align="left">
                    <select name="CollegeIdSearch" id="CollegeIdSearch">
                        <option value="0">请选择</option>
                    </select>
                </div>
            </td>
            <td width="5%" align="center">
                <div align="right">
                    系别 :</div>
            </td>
            <td width="16%" align="center" class="bg3">
                <div align="left">
                    <select name="DepartIdSearch" id="DepartIdSearch">
                        <option value="0">请选择</option>
                    </select>
                </div>
                <div align="left">
                </div>
            </td>
            <td width="5%" align="center">
                <div align="right">
                    专业 :</div>
            </td>
            <td width="16%" align="center" class="bg3">
                <div align="left">
                    <select name="SubjectIdSearch" id="SubjectIdSearch">
                        <option value="0">请选择</option>
                    </select>
                </div>
                <div align="left">
                </div>
            </td>
            <td width="5%" align="center" class="box06">
                <div align="right">
                    班别 :</div>
            </td>
            <td align="center" class="bg3">
                <div align="left">
                    <select name="ClassIdSearch" id="ClassIdSearch">
                        <option value="0">请选择</option>
                    </select>
                </div>
            </td>
            <td width="5%" height="27" align="center">
                <div align="right">
                    年级 :</div>
            </td>
            <td align="left" class="bg3" colspan="">
               <%=Html.DropDownList("YearIdSearch", StudentHelper.GetGradeYear())%>
                <input type="submit" value="查询" /><input type="button" id="addExam" value="添加试卷" />
            </td>  
        </tr>
        <% } %>
    </table>
    <table width="100%" height="5" border="0" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF">
        <tr>
            <td height="5" bgcolor="#FFFFFF">
            </td>
        </tr>
    </table>
    <div id="listDiv">
        <% Html.RenderAction("ExaminationListUc"); %>
    </div>
    <div id="editDiv" title="编辑试卷">
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HeaderContent" runat="server">
    <script type="text/javascript">
        $(function () {
            selectLoad("CollegeIdSearch", "Ajax/GetCollege");
            selectChangeLoad("DepartIdSearch", "CollegeIdSearch", "Ajax/GetDepart/");
            selectChangeLoad("SubjectIdSearch", "DepartIdSearch", "Ajax/GetSubject/");
            selectChangeLoad("ClassIdSearch", "SubjectIdSearch", "Ajax/GetClass/");

            selectChangeLoadDef("CollegeIdSearch", "SubjectIdSearch", "Ajax/GetSubject/", "ClassIdSearch", "Ajax/GetClass/");
            selectChangeLoadDef("DepartIdSearch", "ClassIdSearch", "Ajax/GetClass/");
            $("#editDiv").dialog({
                autoOpen: false,
                height: 460,
                width: 550,
                modal: true,
                close: function () {
                    window.location.reload();
                }
            });

            $("#addExam")
                .click(function () {
                    $("#editDiv").html("loading...");
                    $("#editDiv").load(appRoot + 'AdminExamLib/ExaminationEditUc/?rd=' + rdTime());
                    $("#editDiv").dialog("open");
                });
        });

            var editClickA = function (id) {
                $("#editDiv").html("loading...");
                $("#editDiv").load(appRoot + 'AdminExamLib/ExaminationEditUc/' + id + '?rd=' + rdTime());
                $("#editDiv").dialog("open");
            };

       /* var updateScore = function (id) {
            $.get(appRoot + 'AdminExamLib/ExaminationUpdateScore/' + id + "?rd=" + rdTime(), null, function (data) {
                alert(data);
            });
        };*/
    </script>
</asp:Content>
